/*
 * @Copyright: Copyright (c) 2030 吴周海
 * @Author: wzh200x@126.com
 * @Date: 2025-10-09 14:51:18
 * @LastEditors: wzh200x@126.com
 * @LastEditTime: 2025-10-09 14:57:31
 * @FilePath: \goWebServer\goGameWebServer\internal\register\model_register.go
 * @Description: 文件功能描述
 */
package register

import "goGameWebServer/internal/interfaces"

var modelRegister = make(map[string]func(name string) interfaces.IEntityModel)

func RegisterModel(name string, createFunc func(name string) interfaces.IEntityModel) {
	modelRegister[name] = createFunc
}

func GetModel(name string) interfaces.IEntityModel {
	if _, ok := modelRegister[name]; !ok {
		return nil
	}
	return modelRegister[name](name)
}
